﻿
namespace HSS.Interlink.Web
{
	#region ITransmitFileCache
	/// <summary>
	/// Defines the contract for a Server-Side file cache that support transmiting files.
	/// </summary>
	public interface ITransmitFileCache : IFileCache
	{
		/// <summary>
		/// Attempts to transmit the cached file if it exists.
		/// </summary>
		/// <param name="fileName">The name of the file to try and transmit.</param>
		/// <param name="transmitter">An <see cref="IFileTransmit"/> instance responsible for delivering the file.</param>
		/// <param name="attachment">true to send with Attachment Disposition; otherwise false for Inline Disposition.</param>
		/// <param name="contentTypeOverride">Optional parameter to specify the Content-Type for the response; otherwise an empty string to allow automatic Content-Type resolution based on file extension.</param>
		/// <returns>true if the file was found and transmitted; otherwise false.</returns>
		bool TryTransmitIfExists(string fileName, IFileTransmit transmitter, bool attachment, string contentTypeOverride);
	}
	#endregion
}